package com.example.memurbac_service.servicelmp;

import com.example.memurbac_service.dao.MemuMapper;
import com.example.memurbac_service.dao.MemutypeMapper;
import com.example.memurbac_service.pojo.Memu;
import com.example.memurbac_service.pojo.Memutype;
import com.example.memurbac_service.pojo.Role;
import com.example.memurbac_service.service.MemuService;
import com.example.memurbac_service.service.MemutypeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.ArrayList;
import java.util.List;

@Service
public class MemutypeServicelmp implements MemutypeService
{
    /** 注入 mybaties mapper 接口*/
    @Autowired
    MemutypeMapper mapper;


    /**
     * 添加菜单类型
     */
    @Override
    public int addMemutype(Memutype memutype) {
        return mapper.addMemutype(memutype);
    }
    /**
     * 修改菜单类型
     */
    @Override
    public int upteMemutype(Memutype memutype) {
        return mapper.upteMemutype(memutype);
    }
    /**
     * 停用菜单类型
     */
    @Override
    public int delMemutype(int memutypeid) {
        return mapper.delMemutype(memutypeid);
    }

    /**
     * 根据菜单类型名字 模糊查询
     */
    @Override
    public List<Memutype> reachMemutype(String memutypename) {
        return mapper.reachMemutype(memutypename);
    }

    /**
     * 查询可用的菜单类型列表
     */
    @Override
    public List<Memutype> reachallMemutype() {
        return mapper.reachallMemutype();
    }




    /**
     * 停用菜单类型
     */
    @Override
    public int offMemutype(int Memutypeid) {
        return mapper.offMemutype(Memutypeid);
    }
    /**
     * 启用菜单类型
     */
    @Override
    public int onMemutype(int Memutypeid) {
        return mapper.onMemutype(Memutypeid);
    }

    /**
     * 根据id查询菜单类型
     */
    @Override
    public Memutype selectidMemutype(int Memutypeid) {
        return mapper.selectidMemutype(Memutypeid);
    }
}
